<template>
  <div class="left">
    <div class="left-tree">
      <Tree @handleNodeClick="handleNodeClick" />
    </div>
    <div class="left-control">
      <Control  @setControl='setControl' @setWindow='setWindow' />
    </div>
  </div>
</template>

<script lang="ts">
import { Component, Vue } from "vue-property-decorator";
import Tree from "../Tree/index.vue";
import Control from "../Control/index.vue";

@Component({
  components: { Tree, Control },
})
export default class extends Vue {
    // 设置云台控制
  setControl(id) {
    this.$emit("setControl", id);
  }
  //   窗口设置
  setWindow(num) {
    this.$emit("setWindow", num);
  }
    // 树图点击
  handleNodeClick(data) {
    this.$emit("handleNodeClick", data);
  }
}
</script>

<style lang="scss" scoped>
.left {
  width: 100%;
  height: 100%;
  border: 1px #0276c0 solid;
  &-tree {
    width: 100%;
    padding: 0.1rem;
    border-bottom: 1px solid #0276c0;
    overflow: auto;
    height: calc(100% - 2.5rem);
  }
  &-control {
    width: 100%;
    padding: 0.1rem;
    border-bottom: 1px solid #0276c0;
    overflow: auto;
    height: 2.5rem;
  }
}
</style>

